home *** CD-ROM | disk | FTP | other *** search
/ Amoszine 10 / Amoszine 10 (Disk 3 of 3).adf / Amos_Procs.lha / Button.proc / Button.amosSourceCode
Encoding:
AMOS Source Code  |  1991-12-03  |  698 b   |  25 lines

  1. Procedure BUTTON[Z,Z$,X,Y,B,TB]
  2.    ' By John Smit 
  3.    ' Used to define and print a zone around some text within a border   
  4.    ' The entire area within the border is zoned and not just the text   
  5.    '
  6.    ' use 'reserve zones' command first  
  7.    '  
  8.    ' z=zone number  
  9.    ' z$=text to zone around 
  10.    ' x / y = x and y location of top left corner of the text
  11.    '    leave room for a one character border around the text as well 
  12.    ' b=background color 
  13.    ' tb=Text/border color     
  14.    '    
  15.    X1=X Graphic(X-1)
  16.    Y1=Y Graphic(Y-1)
  17.    X2=X Graphic(Len(Z$)+1+X)
  18.    Y2=Y Graphic(Y+2)
  19.    Paper P
  20.    Pen TB
  21.    Locate X,Y
  22.    Print Border$(Z$,1);
  23.    Set Zone Z,X1+3,Y1+3 To X2-3,Y2-4
  24.    '
  25. End Proc